package com.pan.excep.error;

import java.lang.reflect.Method;

public class AspectException extends RuntimeException{

    Integer code;
    String message;
    Class annotationClass;
    Method targetMethod;

    public AspectException(Integer code, String message, Class annotationClass, Method targetMethod) {
        this.code = code;
        this.message = message;
        this.annotationClass = annotationClass;
        this.targetMethod = targetMethod;
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Class getAnnotationClass() {
        return annotationClass;
    }

    public void setAnnotationClass(Class annotationClass) {
        this.annotationClass = annotationClass;
    }

    public Method getTargetMethod() {
        return targetMethod;
    }

    public void setTargetMethod(Method targetMethod) {
        this.targetMethod = targetMethod;
    }
}
